package name.matthewgreet.example2.view; import name.matthewgreet.example2.action.ViewGameListAction.GameCategory; import name.matthewgreet.example2.common.AbstractListDisplay; import name.matthewgreet.example2.common.ListCache; import name.matthewgreet.example2.dto.GameDTO; import name.matthewgreet.example2.util.FormatLibrary; public class GameListDisplay extends AbstractListDisplay<GameDisplay,GameDTO> { private GameCategory preferredCategory; private String preferredRankName; public GameListDisplay(ListCache<?,GameDTO> listCache, GameCategory preferredCategory) throws Exception { super(listCache); this.preferredCategory = preferredCategory; preferredRankName = FormatLibrary.formatGameCategory(preferredCategory); } @Override protected GameDisplay formatRecord(GameDTO game) { return new GameDisplay(game, preferredCategory); } public String getPreferredRankName() { return preferredRankName; } }